package com.atguigu.gulimall.order.feign;

import com.atguigu.common.to.es.SkuHasStockVo;
import com.atguigu.gulimall.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("gulimall-ware")
public interface WareFeign {
    @PostMapping("/ware/waresku/hasStock")
    public List<SkuHasStockVo> getSkuHasStock(@RequestBody List<Long> SkuIds);

    @PostMapping("/ware/waresku/lockStock")
    public Boolean lockStock(@RequestBody WareSkuLockVo wareSkuLockVo);
}
